<template>
  <div class="detail">
    <div class="goods-top">
      <div class="top-back" @click="backhome">
        <img src="@/assets/back.png" alt="" />
        <p>返回</p>
      </div>
      <p>品牌制造商</p>
    </div>
    <div class="detailtitle">
        <img :src="detailtitle.list_pic_url" alt="">
        <p class="detailtitle-name">{{ detailtitle.name }}</p>
        <p class="detailtitle-desc">{{ detailtitle.simple_desc }}</p>
    </div>
    <div class="content">
        <div v-for="item in listInfo" :key="item.id">
            <img :src="item.list_pic_url" alt="">
            <p class="content-name">{{ item.name }}</p>
            <p class="content-price">￥{{ item.retail_price }}</p>
        </div>
    </div>
  </div>
</template>

<script>
import { detailaction } from "@/api/home/brand/index";
export default {
  name: "Index",

  data() {
    return {
        detailtitle:{},
        listInfo:[]
    };
  },

  created() {
    console.log(this.$route.query.id);
    detailaction({
      id: this.$route.query.id,
    }).then((res) => {
      console.log(res);
      this.detailtitle = res.data
      this.listInfo = res.goodsList
    });
  },

  mounted() {},

  methods: {
    backhome() {
      this.$router.go(-1);
    },
  },
};
</script>

<style scoped lang="scss">
@import "../../scss/brand/detail/index.scss";
* {
  margin: 0;
  padding: 0;
}
</style>